function Get-InsightOnPremServerName {
    [CmdletBinding()]
    param (
        [Parameter(Mandatory = $false)][string]$ServerName,
        [Parameter(Mandatory = $false)][bool]$ConfirmAll = $false
    )

    # Allow user to use existing value or to update it.
    if ((Confirm-SingleValue -Description 'LS Insight server name' -Value $ServerName -ConfirmAll $ConfirmAll) -eq $true) { return $ServerName }

    # Ask user for the server name.
    Write-Host # Newline.
    Write-Host 'Please provide the server name for the LS Insight SQL server.'
    $ServerName = Read-Host -Prompt "Server name"

    return $ServerName
}